package com.entity;

// Generated 09.02.2014 20:16:29 by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * UserEntity generated by hbm2java
 */
@Entity
@Table(name = "user", catalog = "jiraexcel", uniqueConstraints = @UniqueConstraint(columnNames = "name"))
public class UserEntity implements java.io.Serializable {

	private Integer idUser;
	private String self;
	private String name;
	private String emailAddress;
	private String active;
	private String displayName;
	private Set<WatchersEntity> watchersEntities = new HashSet<WatchersEntity>(
			0);
	private Set<FieldsEntity> fieldsEntitiesForIdAuthor = new HashSet<FieldsEntity>(
			0);
	private Set<WorklogsEntity> worklogsEntitiesForIdAuthor = new HashSet<WorklogsEntity>(
			0);
	private Set<FieldsEntity> fieldsEntitiesForIdReporter = new HashSet<FieldsEntity>(
			0);
	private Set<CommentsEntity> commentsEntitiesForIdAuthor = new HashSet<CommentsEntity>(
			0);
	private Set<WorklogsEntity> worklogsEntitiesForIdUpdatedAuthor = new HashSet<WorklogsEntity>(
			0);
	private Set<CommentsEntity> commentsEntitiesForIdUpdateAuthor = new HashSet<CommentsEntity>(
			0);
	private Set<AttachmentEntity> attachmentEntities = new HashSet<AttachmentEntity>(
			0);

	public UserEntity() {
	}

	public UserEntity(String self, String name, String emailAddress,
			String active, String displayName,
			Set<WatchersEntity> watchersEntities,
			Set<FieldsEntity> fieldsEntitiesForIdAuthor,
			Set<WorklogsEntity> worklogsEntitiesForIdAuthor,
			Set<FieldsEntity> fieldsEntitiesForIdReporter,
			Set<CommentsEntity> commentsEntitiesForIdAuthor,
			Set<WorklogsEntity> worklogsEntitiesForIdUpdatedAuthor,
			Set<CommentsEntity> commentsEntitiesForIdUpdateAuthor,
			Set<AttachmentEntity> attachmentEntities) {
		this.self = self;
		this.name = name;
		this.emailAddress = emailAddress;
		this.active = active;
		this.displayName = displayName;
		this.watchersEntities = watchersEntities;
		this.fieldsEntitiesForIdAuthor = fieldsEntitiesForIdAuthor;
		this.worklogsEntitiesForIdAuthor = worklogsEntitiesForIdAuthor;
		this.fieldsEntitiesForIdReporter = fieldsEntitiesForIdReporter;
		this.commentsEntitiesForIdAuthor = commentsEntitiesForIdAuthor;
		this.worklogsEntitiesForIdUpdatedAuthor = worklogsEntitiesForIdUpdatedAuthor;
		this.commentsEntitiesForIdUpdateAuthor = commentsEntitiesForIdUpdateAuthor;
		this.attachmentEntities = attachmentEntities;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id_user", unique = true, nullable = false)
	public Integer getIdUser() {
		return this.idUser;
	}

	public void setIdUser(Integer idUser) {
		this.idUser = idUser;
	}

	@Column(name = "self", length = 1000)
	public String getSelf() {
		return this.self;
	}

	public void setSelf(String self) {
		this.self = self;
	}

	@Column(name = "name", unique = true, length = 100)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "emailAddress", length = 1000)
	public String getEmailAddress() {
		return this.emailAddress;
	}

	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}

	@Column(name = "active", length = 1000)
	public String getActive() {
		return this.active;
	}

	public void setActive(String active) {
		this.active = active;
	}

	@Column(name = "displayName", length = 1000)
	public String getDisplayName() {
		return this.displayName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "watchers_has_user", catalog = "jiraexcel", joinColumns = { @JoinColumn(name = "user_id_user", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "watchers_id_watchers", nullable = false, updatable = false) })
	public Set<WatchersEntity> getWatchersEntities() {
		return this.watchersEntities;
	}

	public void setWatchersEntities(Set<WatchersEntity> watchersEntities) {
		this.watchersEntities = watchersEntities;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "userEntityByIdAuthor")
	public Set<FieldsEntity> getFieldsEntitiesForIdAuthor() {
		return this.fieldsEntitiesForIdAuthor;
	}

	public void setFieldsEntitiesForIdAuthor(
			Set<FieldsEntity> fieldsEntitiesForIdAuthor) {
		this.fieldsEntitiesForIdAuthor = fieldsEntitiesForIdAuthor;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "userEntityByIdAuthor")
	public Set<WorklogsEntity> getWorklogsEntitiesForIdAuthor() {
		return this.worklogsEntitiesForIdAuthor;
	}

	public void setWorklogsEntitiesForIdAuthor(
			Set<WorklogsEntity> worklogsEntitiesForIdAuthor) {
		this.worklogsEntitiesForIdAuthor = worklogsEntitiesForIdAuthor;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "userEntityByIdReporter")
	public Set<FieldsEntity> getFieldsEntitiesForIdReporter() {
		return this.fieldsEntitiesForIdReporter;
	}

	public void setFieldsEntitiesForIdReporter(
			Set<FieldsEntity> fieldsEntitiesForIdReporter) {
		this.fieldsEntitiesForIdReporter = fieldsEntitiesForIdReporter;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "userEntityByIdAuthor")
	public Set<CommentsEntity> getCommentsEntitiesForIdAuthor() {
		return this.commentsEntitiesForIdAuthor;
	}

	public void setCommentsEntitiesForIdAuthor(
			Set<CommentsEntity> commentsEntitiesForIdAuthor) {
		this.commentsEntitiesForIdAuthor = commentsEntitiesForIdAuthor;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "userEntityByIdUpdatedAuthor")
	public Set<WorklogsEntity> getWorklogsEntitiesForIdUpdatedAuthor() {
		return this.worklogsEntitiesForIdUpdatedAuthor;
	}

	public void setWorklogsEntitiesForIdUpdatedAuthor(
			Set<WorklogsEntity> worklogsEntitiesForIdUpdatedAuthor) {
		this.worklogsEntitiesForIdUpdatedAuthor = worklogsEntitiesForIdUpdatedAuthor;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "userEntityByIdUpdateAuthor")
	public Set<CommentsEntity> getCommentsEntitiesForIdUpdateAuthor() {
		return this.commentsEntitiesForIdUpdateAuthor;
	}

	public void setCommentsEntitiesForIdUpdateAuthor(
			Set<CommentsEntity> commentsEntitiesForIdUpdateAuthor) {
		this.commentsEntitiesForIdUpdateAuthor = commentsEntitiesForIdUpdateAuthor;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "userEntity")
	public Set<AttachmentEntity> getAttachmentEntities() {
		return this.attachmentEntities;
	}

	public void setAttachmentEntities(Set<AttachmentEntity> attachmentEntities) {
		this.attachmentEntities = attachmentEntities;
	}

}
